﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.waitingQueue {
    import flash.display.*;
    import net.wooga.pets.constants.*;
    import net.wooga.pets.utils.*;

    public class QueuedPetBubble extends Sprite {

        private const CONTENT_OFFSET_X:int = 150;
        private const CONTENT_OFFSET_Y:int = 225;

        private var _background:MovieClip;
        private var _content:Sprite;
        private var _story:MovieClip;

        public function QueuedPetBubble(){
            this._background = AssetsLibrary.getMovieClip(SpeechBubbleConstants.ICON_QUEUED_PET);
            addChild(this.background);
            this.clear();
        }
        public function show():void{
            visible = true;
        }
        public function hide():void{
            visible = false;
            this.x = -3000;
        }
        public function clear():void{
            if (((this._content) && (contains(this._content)))){
                removeChild(this._content);
            };
            this._content = new Sprite();
            this._content.x = this.CONTENT_OFFSET_X;
            this._content.y = this.CONTENT_OFFSET_Y;
            addChild(this._content);
        }
        public function setStory(_arg1:MovieClip):void{
            this._story = _arg1;
            this._story.scaleX = (this._story.scaleY = 2.5);
            this._story.x = 50;
            this._story.y = 100;
            this._content.visible = false;
            this._background.duration.visible = false;
            this._background.healButton.visible = false;
            this._background.clock.visible = false;
            this.background.storyContainer.addChild(this._story);
        }
        public function removeStory():void{
            this._content.visible = true;
            this._background.duration.visible = true;
            this._background.healButton.visible = true;
            this._background.clock.visible = true;
            Displays.removeChild(this._story);
        }
        public function get background():MovieClip{
            return (this._background);
        }
        public function set background(_arg1:MovieClip):void{
            this._background = _arg1;
        }
        public function get content():Sprite{
            return (this._content);
        }
        public function set content(_arg1:Sprite):void{
            this._content = _arg1;
        }

    }
}//package net.wooga.pets.views.waitingQueue 
